package caishu;

import java.util.Random;
import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Random r=new Random();
        int num = r.nextInt(10)+1;

        Scanner sc=new Scanner(System.in);

        while(true){
            System.out.println("请输入数字");
            int i = sc.nextInt();
            if(num>i){
                System.out.println("猜小了");
                continue;
            }
            else if(num<i){
                System.out.println("猜大了");
                continue;
            }
            else{
                System.out.println("猜对了");
                break;
            }
        }
    }
}
